__author__ = 'carlxie'

import numpy as np
from LayerType import LayerType

class Layer(object):

    def __init__(self,preLayer,type,width,height,depth):
        self.__preLayer = preLayer
        self.__width = width
        self.__height = height
        self.__depth = depth

        self.__type = type
        self.__output = np.empty((width,height,depth))
        self.__weights = None
        self.__biases = None

        self.__delta = None
        self.__score = None

        self.__w_grads = None
        self.__b_grads = None



    @property
    def b_grads(self):
        return self.__b_grads

    @b_grads.setter
    def b_grads(self, value):
        self.__b_grads = value

    @property
    def w_grads(self):
        return self.__w_grads

    @w_grads.setter
    def w_grads(self, value):
        self.__w_grads = value

    @property
    def score(self):
        return self.__score

    @score.setter
    def score(self, value):
        self.__score = value

    @property
    def delta(self):
        return self.__delta

    @delta.setter
    def delta(self, value):
        self.__delta = value

    @property
    def layerType(self):
        return self.__type

    @layerType.setter
    def layerType(self, value):
        self.__type = value

    @property
    def output(self):
        return self.__output

    @output.setter
    def output(self, value):
        self.__output = value

    @property
    def biases(self):
        return self.__biases

    @biases.setter
    def biases(self, value):
        self.__biases = value

    @property
    def weights(self):
        return self.__weights

    @weights.setter
    def weights(self, value):
        self.__weights = value

    @property
    def depth(self):
        return self.__depth

    @property
    def height(self):
        return self.__height

    @height.setter
    def height(self, value):
        self.__height = value

    @property
    def width(self):
        return self.__width

    @property
    def preLayer(self):
        return self.__preLayer

    def forward_prop(self):
        pass

    def back_prop(self):
        pass

    def update_weights(self,eta):
        pass